package com.design.yjx.proxy.remote;

import java.rmi.RemoteException;

/**
 * @author yuanjianxin
 * @date 2017/8/25 10:14
 */
public class GumballMonitor {
    private GumballMachineRemote  remote;

    public GumballMonitor(GumballMachineRemote remote) {
        this.remote = remote;
    }

    public void report() {
        try {
            System.out.println("位置=" + remote.getLocation() + ",数量=" + remote.getCount() + ",状态=" + remote.getState());
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}
